#pragma once

#include <adapter/bitbang.h>
#include "rttJtagGPIO.h"

class rttBbGPIO : public bitbang, private rttJtagGPIO
{
public:
    rttBbGPIO();

public:
    virtual bool open(const char *dev);
    virtual void close();

public:
    virtual int bb_read();
    virtual int bb_write(int tck, int tms, int tdi);
    virtual void bb_reset(int trst, int srst);
    virtual void bb_blink(int on);

private:
    int _trs;//TRST_N;
    int _tdi;
    int _tms;
    int _tck;
    int _tdo;
    int _srs;//SRST_N;

    int _led;//blink LED
};
